package com.wlyuan.gateway.exception;

import com.wlyuan.utils.ResultError;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.lang.NonNull;

/**
 * @author yuanzheng
 */
@AllArgsConstructor
@Data
public class ResultDecorator implements ResultError {
    private final int code;
    private final String message;
    private final String path;

    public ResultDecorator(@NonNull ResultError error, String path) {
        this.code = error.getCode();
        this.message = error.getMessage();
        this.path = path;
    }
}
